﻿using System;
using System.Collections.Generic;

using System.Web;

using System.Web.Security;
using System.Web.Configuration;

namespace FSViet.Survey.Helpers
{
	public class Security
	{
		public static string EncryptPassword(string source)
		{
			return EncryptPassword(source,FormsAuthPasswordFormat.MD5);
		}

		public static string EncryptPassword(string password, FormsAuthPasswordFormat format)
		{
			return FormsAuthentication.HashPasswordForStoringInConfigFile(password, format.ToString());
		}
	}
}